Skip to content

[6.1] Mark #expect(_:throws:) and #require(_:throws:) as to-be-deprecated. #879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Jan 2, 2025

…ed. (#875)

These symbols should go through a transition period where they are
documented as to-be-deprecated rather than being deprecated outright. My
mistake.

With this change applied, Xcode treats these macros as deprecated
(deemphasizing them in autocomplete, for instance) and DocC marks them
as deprecated in an unspecified Swift version, but no warning is emitted
if they are used. This is consistent with API marked
`API_TO_BE_DEPRECATED` or `deprecated: 100000.0` in Apple's SDKs.

> [!NOTE]
> There is a bug in the DocC compiler that emits a diagnostic of the
form:
>
> > ⚠️ 'require(_:sourceLocation:performing:throws:)' isn't
unconditionally deprecated
>
> This issue is being tracked already with rdar://141785948.

Resolves #873.

- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
@grynspan grynspan added bug 🪲 Something isn't working documentation 📚 Improvements or additions to documentation public-api Affects public API labels Jan 2, 2025
@grynspan grynspan added this to the Swift 6.1 milestone Jan 2, 2025
@grynspan grynspan self-assigned this Jan 2, 2025
@grynspan
Copy link
Contributor Author

grynspan commented Jan 2, 2025

@swift-ci test

@grynspan grynspan merged commit a9f21aa into release/6.1 Jan 2, 2025
3 checks passed
@grynspan grynspan deleted the jgrynspan/873-undeprecate-expect-throws-overloads-6.1 branch January 2, 2025 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working documentation 📚 Improvements or additions to documentation public-api Affects public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants